package com.quanquan.store.repository.marketActivity.collectCards;

import com.quanquan.store.entity.marketActivity.collectCards.CollectUserCard;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 * @ClassName CollectUserCardRepository
 * @Description
 * @Author Owen
 * @Date 2019/9/19 0019 下午 6:06
 * @Version V1.0
 **/
public interface CollectUserCardRepository extends JpaRepository<CollectUserCard,Long> {

    CollectUserCard findByUserIdAndCardId(String userId, Long cardId);

    int countByActivityIdAndUserIdAndQuantityGreaterThan(Long activityId, String userId, int quantity);
}
